import os
a1,b1,c1 = int(input()),int(input()),int(input())
a2,b2,c2 = int(input()),int(input()),int(input())
if a1*b2==a2*b1:
    print("error")
    os._exit(0)
else:
    x = (c2*b1-c1*b2)/(a2*b1-a1*b2)
    y = (c1*a2-c2*a1)/(a2*b1-a1*b2)
    print(f"{x:.3f} {y:.3f}")